import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
    {
    title: '项目名称',
    align:"center",
    dataIndex: 'projectName'
   },
   {
    title: '职员姓名',
    align:"center",
    dataIndex: 'name'
   },
   {
    title: '性别',
    align:"center",
    dataIndex: 'sex_dictText'
   },
   {
    title: '电话',
    align:"center",
    dataIndex: 'phone'
   },
   {
    title: '单位名称',
    align:"center",
    dataIndex: 'departName'
   },
   {
    title: '申请房源类型',
    align:"center",
    dataIndex: 'type_dictText'
   },
   {
    title: '轮候排名',
    align:"center",
    dataIndex: 'rank'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '项目名称',
    field: 'projectName',
    component: 'Input',
    dynamicRules: ({model,schema}) => {
          return [
                 { required: true, message: '请输入项目名称!'},
          ];
     },
  },
  {
    label: '职员姓名',
    field: 'name',
    component: 'Input',
    dynamicRules: ({model,schema}) => {
          return [
                 { required: true, message: '请输入职员姓名!'},
          ];
     },
  },
  {
    label: '性别',
    field: 'sex',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"sex"
     }
    dynamicRules: ({model,schema}) => {
          return [
                 { required: true, message: '请输入性别!'},
          ];
     },
  },
  {
    label: '电话',
    field: 'phone',
    component: 'Input',
    dynamicRules: ({model,schema}) => {
          return [
                 { required: true, message: '请输入电话!'},
          ];
     },
  },
  {
    label: '单位名称',
    field: 'departName',
    component: 'Input',
    dynamicRules: ({model,schema}) => {
          return [
                 { required: true, message: '请输入单位名称!'},
          ];
     },
  },
  {
    label: '申请房源类型',
    field: 'type',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"znzf_project_type,name,value"
     }
    dynamicRules: ({model,schema}) => {
          return [
                 { required: true, message: '请输入申请房源类型!'},
          ];
     },
  },
  {
    label: '轮候排名',
    field: 'rank',
    component: 'InputNumber',
    dynamicRules: ({model,schema}) => {
          return [
                 { required: true, message: '请输入轮候排名!'},
          ];
     },
  },
];
